/**
	Copyright (C) 2013-2014 Dmitry Dolgov

	This program is free software; you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation; either version 2 of
	the License, or (at your option) any later version.
		
	This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
	without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
	See the GNU General Public License for more details.
*/

/**
	Entry point (main()/WinMain())
	PL_ENTRY_POINT_INTERNAL - use entry point inside pulsar (by default)
	PL_ENTRY_POINT_EXTERNAL - use entry point outside pulsar, user must initialize library
*/
#if !defined(PL_ENTRY_POINT_INTERNAL) && !defined(PL_ENTRY_POINT_EXTERNAL)
#define PL_ENTRY_POINT_INTERNAL
#endif


/**
	Configuration. Allowed variables are:
	PL_DEBUG - debug configuration (set if DEBUG or _DEBUG defined)
	PL_RELEASE - release version with asserts and debug info
	PL_FINAL - release version
*/
#if !defined(PL_DEBUG) && !defined(PL_RELEASE) && !defined(PL_FINAL)

#if defined(DEBUG) || defined(_DEBUG)
	#define PL_DEBUG
#endif

#endif

/**
	Compiler
	PL_MSC - MSVC compiler (set if _MSC_VER defined)
	PL_GCC - GCU c++ compiler (set if __GNUC__ defined)
	PL_IC - Intel compiler (set if __INTEL_COMPILER defined)
*/
#if !defined(PL_MSC) && !defined(PL_GCC) && !defined(PL_IC)

#if defined(_MSC_VER)
	#define PL_MSC
#elif defined(__GNUC__)
	#define PL_GCC
#elif defined(__INTEL_COMPILER)
	#define PL_IC
#endif

#endif

/**
	CPU code
	PL_INTEL - x86 CPU (__i386__ or PL_INTEL64 defined)
	PL_INTEL64 - x64 CPU (__x86_64__ or _M_X64 defined)
*/
#if !defined(PL_INTEL) && !defined(PL_INTEL64)
#if defined(__i386__) || defined(_M_IX86)
	#define PL_INTEL
#elif defined(__x86_64__) || defined(_M_X64)
	#define PL_INTEL64
#endif

#endif

/**
	Byte ordering
	PL_BYTE_LE - Little endian byte ordefind
	PL_BYTE_BE - Big endian byte ordefind
*/
#if !defined(PL_BYTE_LE) && !defined(PL_BYTE_BE)
#if defined(PL_INTEL)
#define PL_BYTE_LE
#endif
#endif



/**
	Operation System
	PL_WINDOWS - Windows 32 bit (set if _WIN32 defined)
	PL_WINDOWS64 - Windows 64 bit (set if _WIN64 defined)
	PL_LINUX - Linux (set if __unix__ ir __linux__ defined)
	PL_LINUX64
*/
#if !defined(PL_WINDOWS64) && !defined(PL_WINDOWS) && !defined(PL_LINUX) && !defined(PL_PSP_OS) && !defined(PL_PS2) && !defined(PL_MACOS32) && !defined(PL_MACOS64) && !defined(PL_IPHONE) && !defined(PL_ANDROID)

#if defined(_WIN64)
	#define PL_WINDOWS64
#elif defined(_WIN32)
	#define PL_WINDOWS
#elif defined(__unix__) || defined(__linux__)
	#define PL_NIX
#endif

#endif

/**
	Character set
	PL_ANSI - multybyte charset (set is _MBSC defined)
	PL_UNICODE - unicode 16 bit charset (set of _UNICODE defined)
	PL_UNICODE32 - unicode 32 bit charset
*/
#if !defined(PL_ANSI) && !defined(PL_UNICODE) && !defined(PL_UNICODE32)

#if defined(_UNICODE)
	#define PL_UNICODE
#elif defined(_MBSC)
	#define PL_ANSI
#endif

#endif


/**
	Memory management
	PL_MEMORY_DEBUG - full debug memory managent (set for PL_DEBUG)
	PL_MEMORY_RELEASE - release memory managent with some checks (set for PL_RELEASE)
	PL_MEMORY_FINAL - final memory managent (set for PL_FINAL)
	PL_MEMORY_NONE - all memory features turned off
*/
#if !defined(PL_MEMORY_DEBUG) && !defined(PL_MEMORY_RELEASE) && !defined(PL_MEMORY_FINAL) && !defined(PL_MEMORY_NONE)

#if defined(PL_DEBUG)
#define PL_MEMORY_DEBUG
#elif defined(PL_RELEASE)
#define PL_MEMORY_RELEASE
#elif defined(PL_FINAL)
#define PL_MEMORY_FINAL
#endif

#endif


/**
	Protocol support
	PL_LOG_DEBUG - all logs (set if PL_DEBUG specified)
	PL_LOG_INFO - plLogInfo() and above (for all other configurations)
	PL_LOG_WARN - plLogWarn() and above
	PL_LOG_ERROR - plLogError() and ebove
	PL_LOG_FATAL - plLogFatal() only
*/
#if !defined(PL_LOG_DEBUG) && !defined(PL_LOG_INFO) && !defined(PL_LOG_WARN) && !defined(PL_LOG_ERROR) && !defined(PL_LOG_FATAL)

#if defined(PL_DEBUG)
#define PL_LOG_DEBUG
#elif defined(PL_RELEASE) || defined(PL_FINAL)
#define PL_LOG_INFO
#endif

#endif

//
// End of file 'pulsar_defauto.h'
//
